project(test)
cmake_minimum_required(VERSION 3.5.0)

find_package(Eigen3 REQUIRED)
FIND_PACKAGE(Boost COMPONENTS filesystem system thread REQUIRED)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")

set(AIRSIM_ROOT /home/electricsoul/Work/AirSim)
set(OPCV_INSTALL_PATH "/home/electricsoul/opencv-2.4.13/install")

add_subdirectory("${AIRSIM_ROOT}/cmake/rpclib_wrapper" rpclib_wrapper)
add_subdirectory("${AIRSIM_ROOT}/cmake/AirLib" AirLib)
add_subdirectory("${AIRSIM_ROOT}/cmake/MavLinkCom" MavLinkCom)

set(CMAKE_CXX_STANDARD 11)
set(RPC_LIB_INCLUDES " ${AIRSIM_ROOT}/external/rpclib/rpclib-2.2.1/include")
set(RPC_LIB rpc)
message(STATUS "found RPC_LIB_INCLUDES=${RPC_LIB_INCLUDES}")

include_directories(${AIRSIM_ROOT}/AirLib/deps/eigen3)

include_directories(
        include
        ${AIRSIM_ROOT}/AirLib/deps/eigen3
        ${AIRSIM_ROOT}/AirLib/include
        ${RPC_LIB_INCLUDES}
        ${AIRSIM_ROOT}/MavLinkCom/include
        ${AIRSIM_ROOT}/MavLinkCom/common_utils
)

include_directories("/usr/include")

#####################  OpenCV  2.4.13 ##########################################3
include_directories("${OPCV_INSTALL_PATH}/include")
link_directories("${OPCV_INSTALL_PATH}/lib")
link_libraries(
        "${OPCV_INSTALL_PATH}/lib/libopencv_calib3d.so"
        "${OPCV_INSTALL_PATH}/lib/libopencv_core.so"
        "${OPCV_INSTALL_PATH}/lib/libopencv_features2d.so"
        "${OPCV_INSTALL_PATH}/lib/libopencv_flann.so"
        "${OPCV_INSTALL_PATH}/lib/libopencv_highgui.so"
        "${OPCV_INSTALL_PATH}/lib/libopencv_imgproc.so"
)

add_executable(test main.cpp)

target_link_libraries(test AirLib)
target_link_libraries(test
        ${OpenCV_LIBS}
        )



